﻿{include file="public/header" /}
<style>
	.am-dropdown{
		width: 100%;
		padding-left: 30px;
		margin-bottom: 10px;
	}
	.am-dropdown div{
		color: #000;
	}
</style>
{css href="__ROOT__/static/public/umeditor/themes/default/css/umeditor.css" /}
{js href="__ROOT__/static/public/umeditor/third-party/template.min.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.config.js" /}
{js href="__ROOT__/static/public/umeditor/umeditor.min.js" /}
	<form method="post" class="form-x" action="{if $data.id}?id={$data.id}{/if}">
	<div class="panel admin-panel" style="background: #fff">
		<br/>
		<script>
		//city 参数和回调
		var cateid="{$data.cateid}";
		var selectc=true;
		function select_g(){
			return false;
		}
		function select_c(){
			return false;
		}
        var pid='{$data.pid}';
        var cid='{$data.cid}';
        var aid='{$data.aid}';
        var selectc=true;
        var selecta=true;
		</script>
		<div class="am-dropdown">
			<div class="label">
				<label>{:lang('currency')['city']}</label>
			</div>
			<div class="field">
				{include file="public/city" /}
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="title">{:lang('label')['category']}</label>
			</div>
			<div class="field">
				{include file="public/category" /}
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="title">{:lang('label')['title']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="title" name="title" value="{$data.title}" size="80" placeholder="{:lang('label')['title']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="price">{:lang('label')['price']}</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="price" name="price" value="{$data.price}" size="80" placeholder="{:lang('label')['price']}" data-validate="required:{:lang('currency')['required']}" />
			</div>
		</div>
		<div class="am-dropdown">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image1">{:lang('label')['image']}1</label>
			</div>
			<div class="field">
				<input type="text" readonly class="input input-auto" id="image1" name="image1" value="{$data.image1}" size="65" placeholder="{:lang('label')['image']}" data-validate="required:{:lang('currency')['required']}" />
				<span class="addbtn"><button type="button" data-id="image1" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="am-dropdown">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image2">{:lang('label')['image']}2</label>
			</div>
			<div class="field">
				<input type="text" readonly onclick="$(this).val('')" class="input input-auto" id="image2" name="image2" value="{$data.image2}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image2" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="am-dropdown">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image3">{:lang('label')['image']}3</label>
			</div>
			<div class="field">
				<input type="text" readonly onclick="$(this).val('')" class="input input-auto" id="image3" name="image3" value="{$data.image3}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image3" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="am-dropdown">
		<div class="input-inline clearfix">
			<div class="label">
				<label for="image4">{:lang('label')['image']}4</label>
			</div>
			<div class="field">
				<input type="text" readonly onclick="$(this).val('')" class="input input-auto" id="image4" name="image4" value="{$data.image4}" size="65" placeholder="{:lang('label')['image']}" />
				<span class="addbtn"><button type="button" data-id="image4" class="button upload">{:lang('form')['file']}</button></span>
			</div>
		</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label>{:lang('label')['status']}</label>
			</div>
			<div class="field">
				<div class="button-group button-group-small radio">
					<label class="button {if !$data.status}active{/if}"><input name="status" value="0" {if !$data.status}checked="checked"{/if} type="radio"><span class="icon icon-check"></span> 上架</label>
					<label class="button {if $data.status == "1"}active{/if}"><input name="status" value="1" {if $data.status == "1"}checked="checked"{/if} type="radio"><span class="icon icon-times"></span> 下架</label>
				</div>
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label>介绍</label>
			</div>
			<div class="field">
				<textarea name="service" class="input input-auto" rows="5" cols="80" placeholder="介绍">{$data.service}</textarea>
			</div>
		</div>
		<div class="form-button">
			<button class="button bg-main" type="submit">{:lang('form')['submit']}</button>
		</div>
		<br/>
		</div>
	</form>
		<script>
		$("[name='status']").click(function(){
			var status = $("[name='status']:checked").val();
			if(status=='4'){
				$("#refuse").removeClass('hidden');
			}else{
				$("#refuse").addClass('hidden');
			}
		});
//		var um = UM.getEditor('myEditor');
	</script>
{include file="public/footer" /}